<?php
include_once('common/header.php');
if($AppUI->id <= 0 || (isset($_SESSION['education']) && (($_SESSION['education']&1<<1) == 0))) {
	$this->_redirect(HOST_BACKEND);
}
$intType		= $objRequest->getParam('type', EDUCATION_TYPE);
$intParentId	= $objRequest->getParam('parentid', 0);
$intCategoryId	= $objRequest->getParam('cate', 0);
$intProvince	= $objRequest->getParam('prov', 0);
$intDistrict	= $objRequest->getParam('dist', 0);
$objCommon		= new Ecore_Common();
$objCategory	= new Category();
$objEducation	= new Education();
$objSlideshow	= new Slideshow();
$arrSub			= null;
$arrSpec		= null;
$this->view->arrProvince	= $objCommon->getProvince();
$this->view->arrCategory	= $objCategory->getParent($intType);
$this->view->arrSpec		= $objCategory->getParent(EDUCATION_SPEC_TYPE);
$this->view->intParentId	= $intParentId;
$this->view->intCategoryId	= $intCategoryId;
$this->view->intProvince	= $intProvince;
$this->view->intDistrict	= $intDistrict;
$this->view->arrAlbum		= $objSlideshow->getAlbumForCombo($intType);
if(isset($_SESSION['EDUCATION_POST']['pprovince'])) {
	$this->view->arrDistrict	= $objCommon->getDistrict($_SESSION['EDUCATION_POST']['pprovince']);
}elseif($intProvince > 0) {
	$this->view->arrDistrict	= $objCommon->getDistrict($intProvince);
}

$this->view->arrType	= $arrType;
if(isset($_SESSION['EDUCATION_POST']['ptbfeature'])) {
	$strJson	= str_replace('\\','',$_SESSION['EDUCATION_POST']['ptbfeature']);	
	$this->view->arrFeatures = json_decode($strJson);
}
